/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmProjectNature extends BasicModel<PmProjectNature> {
  createDate?: string; // 创建时间
  name?: string; // name
  projectno?: string; // 项目编号
  appointcode?: string; // appointcode
  metercode?: string; // 水表编号
  metername?: string; // 水表名称
  naturecode?: string; // 性质编码
  naturename?: string; // 性质名称
  caliber?: string; // 水表口径
  metercount?: number; // 数量
  pressuregradecode?: string; // 加压等级编号
  pressuregradename?: string; // 加压等级名称
  dmapartition?: string; // DM分区
  ismonitor?: number; // 是否监测表
  isfirecontrol?: number; // 是否消防表
  isdesignerchange?: number; // 是否设计变更
  issplitorder?: number; // 是否分单
  splitprojectno?: string; // 分单编号
  taskid?: string; // 任务ID
  splitedcount?: number; // 分单数量
  remaining?: number; // remaining
}

export const pmProjectNatureList = (params?: PmProjectNature | any) =>
  defHttp.get<PmProjectNature>({
    url: adminPath + '/material/nature/pmProjectNature/list',
    params,
  });

export const pmProjectNatureListData = (params?: PmProjectNature | any) =>
  defHttp.post<Page<PmProjectNature>>({
    url: adminPath + '/material/nature/pmProjectNature/listData',
    params,
  });

export const pmProjectNatureForm = (params?: PmProjectNature | any) =>
  defHttp.get<PmProjectNature>({
    url: adminPath + '/material/nature/pmProjectNature/form',
    params,
  });

export const pmProjectNatureSave = (params?: any, data?: PmProjectNature | any) =>
  defHttp.postJson<PmProjectNature>({
    url: adminPath + '/material/nature/pmProjectNature/save',
    params,
    data,
  });

export const pmProjectNatureDelete = (params?: PmProjectNature | any) =>
  defHttp.get<PmProjectNature>({
    url: adminPath + '/material/nature/pmProjectNature/delete',
    params,
  });
export const pmProjectNatureFdListData = (params?: PmProjectNature | any) =>
  defHttp.post<Page<PmProjectNature>>({
    url: adminPath + '/material/nature/pmProjectNature/fdListData',
    params,
  });
